﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using YArchitech.Controls;

namespace YArchitech.HVAC.PipeSetting
{
	public partial class FrmAddStd : HYBaseForm
	{
		public string NewName { get; set; }

		public FrmAddStd()
		{
			this.InitializeComponent();
		}

		public FrmAddStd(string defaultName) : this()
		{
			this.defaultName = defaultName;
		}

		private void FrmAddStd_Load(object sender, EventArgs e)
		{
			this.tbName.Text = this.defaultName + 1;
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.OK;
			this.NewName = this.tbName.Text.Trim();
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.Cancel;
		}

		private string defaultName;
	}
}
